package nckd.wnqjt.tmc.tda.plugin.form;

import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.form.control.IFrame;
import kd.bos.form.plugin.AbstractMobFormPlugin;
import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.sdk.plugin.Plugin;

import java.util.EventObject;

/**
 * @author zhujintao
 * @date 2024/11/05
 * @desc 移动端资金大屏的地址
 */
public class FundScreenPhoneMobFormPlugin extends AbstractMobFormPlugin implements Plugin {
    @Override
    public void afterCreateNewData(EventObject e) {
        QFilter qFilter = new QFilter("number", QCP.equals, "20241203002");
        DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle("nckd_setfundscreensrc", "id,number,name,nckd_src", qFilter.toArray());
        IFrame iframe = this.getView().getControl("nckd_iframeap");
        iframe.setSrc(dynamicObject.getString("nckd_src"));
    }

}